<%= render "base" %>
<div class="sidebar">
  <div class="box">
    <%= link_to "投稿", new_post_path, :class => "btn success" %>
  </div>
</div>

<div class="content">
  <div id="posts" class="box">
    <h1><%= t("posts.recent_publish_post")%></h1>
    <ul>
    <% @posts.each do |item| %>
    <li>
      <div class="title"><%= post_title_tag(item) %></div>
      <div class="info">
        <%= t("posts.published_at") %>: <%= timeago(item.created_at) %>, <%= item.hits %> <%= t("common.read_times") %>, <%= link_to("#{item.comments_count} #{t("common.comments")}", post_path(item.id)+"#comments") %>
      </div>
    </li>
    <% end %>
    </ul>
    <%= will_paginate @posts %>
  </div>
</div>

